from django.urls import re_path
from rest_framework.routers import DefaultRouter

from vadmin.utils.login import LoginView
from vadmin.views import UserProfileViewSet, PostViewSet

router = DefaultRouter()
# 用户
router.register(r"user", UserProfileViewSet, basename="user")
# 岗位
router.register(r"post", PostViewSet, basename="post")

urlpatterns = [
    # 用户登录
    re_path(r"^login/$", LoginView.as_view()),
    # # 导出资产
    # re_path("assetinfo/export/", AssetInfoViewSet.as_view({"get": "export"})),
    # # 导入功能
    # re_path("assetinfo/asset_import/", AssetInfoViewSet.as_view({"get": "importTemplate", "post": "importTemplate"})),
]
urlpatterns += router.urls
